package cn.school.iot.dao;


import cn.school.iot.param.StudentRulePageParam;
import cn.school.iot.vo.FaceGateRuleTimePeriodVo;
import cn.school.iot.vo.StudentRuleVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.mapstruct.Mapper;

import java.util.List;

@Mapper
public interface FaceGateRuleTimePeriodDao extends BaseMapper<FaceGateRuleTimePeriodVo> {
    @Select(value = "   select fgrp.* " +
                    "   from t_face_gate_rule_time_period fgrp " +
                    "   ${ew.customSqlSegment}")
    public Page<FaceGateRuleTimePeriodVo> getList(Page page, @Param("ew") QueryWrapper<FaceGateRuleTimePeriodVo> queryWrapper);

    int queryCount(StudentRulePageParam param);

    List<StudentRuleVo> queryLimit(StudentRulePageParam param);

    void insertBatch(List<FaceGateRuleTimePeriodVo> faceGateRuleTimePeriodVos);
}
